home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / MacTCP Library 1.1 / Readme
Text File  |  1995-12-07  |  6KB  |  52 lines

  1. MacTCP Library 1.1  12/04/95
  2.  
  3. As part of the files which I am contributing to the Apprentice 4 CD, I am including my own MacTCP library.  I know what you're thinking, "not another MacTCP library".  As with everyone else who has created and posted a MacTCP library, I can say that mine is different.
  4.  
  5. My library doesn't do alot behind the back of the programmer, it doesn't try to implement sockets on top of MacTCP, and it doesn't contain alot of fluff.
  6.  
  7. What it does provide is a thin layer over the PBControl call.  Simply put, the library replaces all of the calls to PBControl with descriptive functions.  For example, instead of calling PBControl with a code to open an active TCP stream, you would use the TCP_ActiveOpen call.  All of the control is still left in the hands of the programmer.
  8.  
  9. The library has been recently updated (by Mike Cohen, info below) to support the latest Universal Headers and CodeWarrior 7.  I think that one of Mike's comments to me about the library says it all: "I looked at all of the MacTCP code on the Apprentice CDs and the new PowerPlant networking classes and found this to be the nicest since it has so little overhead".
  10.  
  11. Anyway, I have included two demo applications which show how to use the MacTCP library.
  12.  
  13. ShowMyAddress gets the mac's ip address and tries to lookup the canonical name from the nameserver.  It basically shows how to query the Resolver.  This application has not been updated to work with CodeWarrior 7.
  14.  
  15. Host Probe uses TCP and UDP to 'probe' a host's facilities.  The idea came from some code which I had found on the net to implement a UDP probe for unix.  Using that idea as a springboard, I created Host Probe to do the same thing from a mac.  This application has been updated to work with CodeWarrior 7.
  16.  
  17. New for the library is a SOCKS v4 library that can open connection through a SOCKS daemon, as well as a set of higher-level APIs for connecting through MacTCP.  The higher-level API was started by Mike; I extended the API somewhat.  Note that the high-level API will add some overhead if you use it, but it does act as a decent example.
  18.  
  19. What's Included
  20.  
  21. The following pieces are included:
  22. •  LowLevel Source files for the library (MacTCP Library 1.1:Library:LowLevel ƒ:Source)
  23. •  LowLevel Headers for the library (MacTCP Library 1.1:Library:LowLevel ƒ:Headers)
  24.          - Includes Apple's MacTCP.h file (latest from ETO #18), AddressXLation.h (the only one I have is one that I modified for the original library; I assume that Apple probably has a later version, but it is nowhere that I can find).
  25. •  HighLevel Library API (MacTCP Library 1.1:Library:HighLevel ƒ:)
  26. •  ShowMyAddress example (MacTCP Library 1.1:ShowMyAddress)
  27. •  Host Probe example (MacTCP Library 1.1:Host Probe)
  28. •  SOCKS v4 library (MacTCP Library 1.1:SOCKS Library)
  29.  
  30. About the SOCKS Library
  31.  
  32. The company I work for uses a SOCKS daemon to control access to the Internet.  This is fine if you have the tools that can tunnel through the SOCKS daemon.  However, I haven't seen any Mac code showing how to go through the SOCKS daemon until now.  The code that I have included does work (I went through our SOCKS daemon to my personal Internet provider and passed some text there and received it again, so I know the code works).
  33.  
  34. There is one important note that must be added.  According to the documentation for the SOCKS interface, one piece of information to provide to the server is the login name of the user initiating the connection.  The SOCKS server is supposed to connect to the Identd daemon on the machine where the user is initiating the connection to verify that the login name is that of the user initiating the connection.  I don't have an Identd server running on my Mac (yet ;-) but the SOCKS server didn't return the 'no identd server' error (the docs says that's the error that should come back), so I think that our local daemon is set up not to connect to the Identd server on the local machine (kinda makes sense; as a shop of many PC and 2 Mac users, how many Identd servers would really be available to respond?).  What this means to you is that if you can't get through your SOCKS daemon, it could be because there is no Identd daemon running.  If you find you need an Identd daemon, I should have one up and running by Jan. 1, 1996, so drop me an email (<mailto:dnebing@epix.net>) and I ship you one.
  35.  
  36. Another side note: in the current version of the library, only synchronous connections are supported.  I have stubs in place for building the asynchronous connection code, but I couldn't get it done for this version of Apprentice (should be ready for the next version though ;-).
  37.  
  38. I have also started to work on a Mac version of SocksCap (SocksCap is a Windows library/patch/something or other which allows existing WinSock-compliant communications software to connect through the SOCKS daemon instead of initiating a direct connection).  My preliminary design indicates that it shouldn't be too difficult to implement, but until I start getting into the nuts and bolts of the patch I won't know how it is going to result.  MacSocksCap should be ready by the next version of Apprentice, too.
  39.  
  40. Author:
  41. Dave Nebinger - <mailto:dnebing@epix.net>
  42. KHP Services, Inc. - (717) 975-3013 / FAX (717) 760-9640
  43. Home Page: <http://www.AmbrosiaSW.com/~dnebing/>
  44.  
  45. Just because something is said to lighten a subject doesn't mean the subject is taken lightly - Dr. Who
  46.  
  47. Lots O' Credit:
  48. Mike Cohen - isis@netcom.com
  49. ISIS International - (818) 788-4747 / FAX (818) 501-0653
  50. Home Page: http://www.isis-intl.com/
  51. Sound is the same for all the world - Youssou N'dour, "Eyes Open"
  52.